﻿
/// <reference path="jquery-1.4.4-vsdoc.js" />

$(document).ready(function () {

    //         全部分类
    //Default Action 
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("c ui-icons").show(); //Activate first tab 
    $(".tab_content:first").show(); //Show first tab content 
    //On Click Event 
    $("ul.tabs li").click(function () {
        $("ul.tabs li").removeClass("c ui-icons"); //Remove any "active" class 
        $(this).addClass("c ui-icons"); //Add "active" class to selected tab 
        $(".tab_content").hide(); //Hide all tab content 
        var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content 
        $(activeTab).fadeIn(); //Fade in the active content 
        return false;
    });
    $("#gjMenu").click(function () {
        VNavParent(this);
    });
    $("#menu").children("p").click(function () {
        var childrens = $("#menu").children("p");
        childrens.removeClass("VNavLeaf ui-icons");
        $(this).addClass("VNavLeaf ui-icons");
    });


});

function VNavParent(obj) {
    var div = $("#gjMenuDiv");
    var VP_down_className = div.attr('class');
    $("#gjMenuUL").slideToggle(300);
    if (VP_down_className == 'VNavParentI') {
        div.addClass('VNavParentII_B').removeClass('VNavParentI')

    } else {
        div.addClass('VNavParentI').removeClass('VNavParentII_B')
    }
}

function bppm_post(URL, PARAMS) {
    var temp = document.createElement("form");
    temp.action = URL;
    temp.method = "post";
    temp.name = "myform";
    temp.id = "loginForm";
    temp.target = "_blank";
    temp.style.display = "none";
    for (var x in PARAMS) {
        var opt = document.createElement("input");
        opt.name = x;
        opt.value = PARAMS[x];
        // alert(opt.name)        
        temp.appendChild(opt);
    }
    document.body.appendChild(temp);
    temp.submit();
    return temp;
}

function redirectbppm(URL) {
    bppm_post(URL, { sub: "Submit", login: 'portal', password: 'Portal1234' });
    return false;
}